package org.project.single.utils;

import org.project.single.pojo.constant.CacheNameConst;
import org.stone.project.baseRedis.utils.RedisUtil;

/**
 * 角色工具
 */
public class RoleUtil {
    /**
     * 根据角色code获取菜单权限
     * @param roleCode
     * @return
     */
    public boolean roleHasPermisson(String roleCode,String permissionFlag){
        String cacheName = CacheNameConst.getCacheName(CacheNameConst.RBAC_ROLE_MENU_CACHE_DATA, roleCode,permissionFlag);
        return RedisUtil.keyExist(cacheName);
    }
}